from django.contrib import admin
from django.views.static import serve
from django.conf import settings
from django.urls import path,re_path
from yxb import Index
from yxb import Mysql
from yxb import Add
from yxb import edit_update
from yxb import delete

urlpatterns = [
    path('', Index.index),
    path('admin/', admin.site.urls),
    path('mysql/', Mysql.mysql_connect_test),
    path('name/<str:aaa>/', Index.get_aaa),

    # add
    path('add/', Add.index),
    path('add_ajax/new/', Add.ajax_new),

    # edit_update 
    path('edit/', edit_update.index),
    path('update/', edit_update.update),

    # delete (ajax)
    path('delete/', delete.delete_ajax),

    re_path(r'^static/(?P<path>.*)$',serve,{
        'document_root':settings.STATIC_ROOT
    })

]
